<?php


namespace App\Models\CacheModel;


use App\Models\Api\BaseCache;
use think\Log;

class ZlStarRecode extends BaseCache
{
    protected $table = 'wechat_backup_07_18_14_43_00.zl_star_recode';

    protected $cacheModel = 'star_recode.recode';

    /**
     * @param $ids
     * @param $type
     * @param $sortType
     * @return array|false|string
     */
    public function getInfoByIdsInData($ids, $type, $sortType)
    {
        try
        {
            if ($ids)
            {
                $this->whereIn('id', $ids);
            }

            $starRecodeResult = $this->where('status', 1)
                ->column('extra,create_time,update_time', 'id');
        }
        catch (\Exception $e)
        {
            Log::write('明星档案获取异常：' . $e->getMessage(), 'error', true);
            return [];
        }

        return $starRecodeResult;
    }

}
